//    Copyright (C) Kherty.  All rights reserved.
using System.Windows;

namespace OpenLS.Core
{
    public class PropertyUndoUnit: IUndoUnit
    {
        public PropertyUndoUnit(DependencyObject target, DependencyProperty property, object value)
        {
            this.target = target;
            this.property = property;
            _value = value;
        }
        readonly DependencyObject target;
        readonly DependencyProperty property;
        readonly object _value;

        #region IUndoUnit Members

        public void Do()
        {
            target.SetValue(property, _value);
        }

        #endregion

        #region IUndoUnit Members


        public bool Merge(IUndoUnit unit)
        {
            return false;
        }

        #endregion
    }
}